package future.demo01;

public class RealData implements Data {
    protected final String result;

    public RealData(String result) {
        StringBuffer buffer = new StringBuffer();
        for (int i = 0;i<10;i++) {
            buffer.append(result);
            try {
                Thread.sleep(100);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        this.result = buffer.toString();
    }

    @Override
    public String getResult() {
        return result;
    }
}
